<?php

use yii\db\Migration;

/**
 * Handles adding columns to table `{{%donor}}`.
 */
class m221122_055226_add_coop_contract_columns_to_donor_table extends Migration
{
    /**
     * {@inheritdoc}
     */
    public function safeUp()
    {
        $this->addColumn('{{%donor}}', 'coop_contract_date_sign', $this->date());
        $this->addColumn('{{%donor}}', 'coop_contract_date_end', $this->date());
        $this->addColumn('{{%donor}}', 'coop_contract_subject', $this->string(512));
    }

    /**
     * {@inheritdoc}
     */
    public function safeDown()
    {
        $this->dropColumn('{{%donor}}', 'coop_contract_date_sign');
        $this->dropColumn('{{%donor}}', 'coop_contract_date_end');
        $this->dropColumn('{{%donor}}', 'coop_contract_subject');
    }
}
